﻿namespace Pisces
{
    /*
     * 挂在entity上的模块抽象类
     * created by wangqiang
    */
    public abstract class AbstractEntityModule : InterfaceEntityLiftcycle
    {
	    /// <summary>
	    /// 宿主实体
	    /// </summary>
	    private AbstractEntity hostEntity;
		    
	    public AbstractEntity HostEntity
	    {
		    get => hostEntity;
		    set => hostEntity = value;
	    }

	    public virtual void onInit()
	    {
	    }
        public virtual void onLoaded()
        {
        }

        public virtual void onAwake()
        {
        }

        public virtual void onUpdate(float deltaTime)
        {
        }

        public virtual void onDestroy()
        {
        }
    }
}